package com.mengshuai.technology.order.controller;


import com.mengshuai.technology.common.util.RedisUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author ms
 * @since 2025-06-19
 */
@RestController
@RequestMapping("/redis")
public class RedisController {
    @Autowired
    private RedisUtils redisUtils;

    @GetMapping("/set")
    public String setValue(String key, String value) {
        redisUtils.setValue(key, value);
        return "success";
    }

    @GetMapping("/get")
    public String getValue(String key) {
        return redisUtils.getValue(key);
    }

}
